package com.waitingresult.number;

/**
 * @Author: WangShuai
 * @CreateTime: 2024-06-24  13:11
 * @Description:
 * @Version: 1.0
 */
public class AddOne {
    public static void main(String[] args) {

    }

    public int[] plusOne(int[] digits) {

        int tempNumber = digits[digits.length - 1] + 1;
        if (tempNumber < 10) {
            digits[digits.length - 1] = tempNumber;
        } else {
            int i = tempNumber % 10;
            int i1 = tempNumber / 10;
            if (i1 < 10) {
                digits[digits.length - 1] = tempNumber;
            } else {

            }
        }
        return digits;
    }
}
